package com.dm.client;

import com.dm.config.DmConfiguration;
import com.dm.fallback.DmOrderClientFallBack;
import com.dm.pojo.DmOrder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
* Feign
*/
@FeignClient(name = "dm-order-provider", configuration = DmConfiguration.class, fallback = DmOrderClientFallBack.class)
public interface DmOrderClient {
@RequestMapping(value = "/getDmOrderById",method = RequestMethod.POST)
public DmOrder getDmOrderById(@RequestParam("id") Long id)throws Exception;

@RequestMapping(value = "/getDmOrderListByMap",method = RequestMethod.POST)
public List<DmOrder>	getDmOrderListByMap(@RequestParam Map<String,Object> param)throws Exception;

@RequestMapping(value = "/getDmOrderCountByMap",method = RequestMethod.POST)
public Integer getDmOrderCountByMap(@RequestParam Map<String,Object> param)throws Exception;

@RequestMapping(value = "/qdtxAddDmOrder",method = RequestMethod.POST)
public Long qdtxAddDmOrder(@RequestBody DmOrder dmOrder)throws Exception;

@RequestMapping(value = "/qdtxModifyDmOrder",method = RequestMethod.POST)
public Long qdtxModifyDmOrder(@RequestBody DmOrder dmOrder)throws Exception;

@RequestMapping(value = "/deleteDmOrderById", method = RequestMethod.POST)
public Long deleteDmOrderById(@RequestParam("id") Long id) throws Exception;
}

